using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PhongKham.View
{
    public partial class frmLoaiBenh : PhongKham.FrmTemplate
    {
        private DataSet dsLoaibenh = new DataSet();
        PhongKham.Controller.LoaiBenhController control = new PhongKham.Controller.LoaiBenhController();
        public frmLoaiBenh()
        {
            InitializeComponent();
            DisplayInfo();
        }

        private void DisplayInfo()
        {
            dsLoaibenh = control.GetAll();
            gridControl1.DataSource = dsLoaibenh.Tables[0];
            gvLoaibenh.BestFitColumns();
        }

        public override void PerformSave()
        {            
            control.UpdateLoai(dsLoaibenh.Tables[0]);
        }

        public override void PerformRefresh()
        {
            DisplayInfo();
        }
    }
}